let goods  = require("../model/goods");
module.exports = {
    add:(data)=>{
        return goods.insertMany([data]);
    },
    query:(data)=>{
        return goods.find(data);
    },
    getall:()=>{
        return goods.find();
    },
    insertmany:(data)=>{
        return goods.insertMany(data)
    },
    update:(data,params)=>{
        return goods.updateOne(params,{$set:data})
    },
    delete:(params)=>{
        return goods.remove(params)
    }
}